package com.example.demo.user.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.example.demo.user.entity.UUser;
import com.example.demo.user.mapper.UUserMapper;
import com.example.demo.user.service.UUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表; 服务实现类
 * </p>
 *
 * @author 涛
 * @since 2024-08-01
 */
@Service("uUserService")
public class UUserServiceImpl extends ServiceImpl<UUserMapper, UUser> implements UUserService {

    @Autowired
    private UUserMapper uUserMapper;

    @Override
    public UUser login(String username, String password) {
        UUser user = getById(1);
        user.setName("4");
        updateById(user);
        return user;
    }

    @Override
    public IPage<UUser> getUserList(IPage<UUser> page) {
        return uUserMapper.getList(page);
    }
}
